p <- mtcars %>%
mutate(CarName = row.names(mtcars),
Transmission = factor(am, labels = c('Automatic','Manual'))) %>%
ggplot(aes(x = mpg, y = hp, color = Transmission, label = CarName)) +
theme_minimal() +
theme(text = element_text(size = 15, family = 'serif')) +
geom_point() +
labs(x = 'Miles per Gallon', y = "Horsepower",
title = 'Miles per Gallon vs. Horsepower by Transmission Type') +
guides(color = FALSE) +
scale_color_paletteer_d('yarrr::google') +
annotate(geom = 'label', x = 20, y = 300, label = 'Notice the Downward Trend')